<?php
namespace AuctionCore\Other;

/**
* 车主列表 单元测试
* @author       Eric Lee
*/
class AnnouncementTest extends \PHPUnit_Framework_TestCase
{

	public function testDetail(){

		$a = new Announcement();
        $data =  $a->detail(305);
        $this->assertTrue($data?true:false);
	}
    public function testGet_list(){
        $a = new Announcement();
        $r = $a->get_list(20,20);
        $this->assertTrue($r?true:false);
    }

    public function testDel(){
        $a = new Announcement();
        $r = $a->del(32414);
        $this->assertTrue($r?true:false);
    }

    public function testAdd(){
        $a = new Announcement();
        $data = array();
        $data['title'] = 'test ann title '.time();
        $data['content'] = 'test ann content '.time();
        $data['status'] = '0';
        $data['emp_id'] = '1';
        $data['create_time'] = date('Y-m-d H:i:s');
        $r = $a->add($data);
        $this->assertTrue($r?true:false);
    }



}

?>